home *** CD-ROM | disk | FTP | other *** search
/ Commodore Free 12 / Commodore_Free_Issue_12_2007_Commodore_Computer_Club.d64 / t.soasc how < prev   
Text File  |  2023-02-26  |  14KB  |  554 lines

  1. u
  2. SOASC= Project - HOW WAS IT DONE
  3.  
  4. The SOASC= project is an automated
  5. recording technique invented by me
  6. (Stone Oakvalley) in order to mass
  7. record music from the legendary CBM 64
  8. and its SID chips (6581 & 8580).
  9. Realizing this project needed unique
  10. hardware solutions & software to back
  11. it all up. I spent approx 180 hours on
  12. research & how to figure a plan that
  13. would help automatically record this
  14. massive amount of CBM 64 music. Here is
  15. a more or less complete detailed
  16. description of all the problems and
  17. solutions I encountered.
  18.  
  19. INTRODUCTION
  20. First download the whole HVSC SID
  21. Collection & unpack
  22.  
  23. PREPARING MADNESS
  24. I then programmed a tool in PureBasic
  25. to interpret and extract out the Path+
  26. Filename i.e. "/20CC/Conquestador.sid"
  27. and then all the subtunes length from
  28. the songslength string: "3:28 3:42 4:39
  29. 0:01(G) 0:01(G) 0:09(G)" from the file
  30. in the HVSC collection
  31.  
  32. "C64Music/DOCUMENTS/Songlengths.txt"
  33. I then made my own database .txt with
  34. and looped output like: 20CC/
  35. Conquestador.sid
  36.  
  37. 3:28
  38. 3:42
  39. 4:39
  40. 0:01
  41. 0:01
  42. 0:09
  43. #(Separator)
  44. etc....into a large file containing all
  45. song info from the "Songlengths.txt"
  46.  
  47. MAPPING THE SID'S
  48. Then I binary read each .SID file and
  49. checked the amount of sub tunes within
  50. it. I hacked the SUB-TUNE bit in the
  51. SID file to make the SID file start on
  52. this tune when played, and then I made
  53. a duplicate  file of it. (This is
  54. because the PSID64 SID Player could
  55. not be used to skip tunes, and my
  56. system did not have any support to
  57. send any additional keys either to the
  58. C64. More on this later) Then I
  59. extracted the required info I needed
  60. for the SIDREC recorder and when
  61. constructing the MP3 tags. I created a
  62. unique .INI file for each SID sub-tune
  63. file like this, based on the info from
  64. the SID file:
  65.  
  66. Filename: "0000101.INI" etc etc (More
  67. about this filename later)
  68.  
  69. [SID-DATA]
  70. PATH = 20CC/
  71. FILE = Conquestador.sid
  72. TUNE = 01%3:28 (This means Tune 01 is
  73.  
  74. 3:28 long);
  75. [MP3-DATA]
  76. MP3-FILE = Conquestador_T01.sid.mp3
  77. (The new filename to indicate Track 01)
  78. MP3-TITL = Conquestador
  79. MP3-AUTH = Edwin van Santen & FalcoPaul
  80. MP3-YEAR = 1991
  81. MP3-COPY = German Design Group
  82.  
  83. With the above procedure the amount
  84. of files of course increased to 46668
  85. .SID files and 46668 .INI files
  86.  
  87. FILENAMES
  88. Then all the files was renamed (both
  89. .SID and .INI) into my own charset
  90. for usage towards the PAR: Relay C64
  91. keyboard interface. The num of chars
  92. used in the filename created in step 3
  93. above needed to be a little bit
  94. compressed, due to the fact that there
  95. were 50000 unique filenames and I also
  96. needed bits in the PAR: ports to send
  97. SHIFT and other special C64 keys,
  98. including reset and SCROLLLOCK
  99. detection for the 64HDD server. Anyway
  100. a filename like "3207101.INI" was
  101. renamed to "32O7LOL.INI" Where "1"
  102. was replaced by "L" and "0" (zero) was
  103. replaced by the letter "O" This
  104. renaming caused the recording process
  105. to begin not at the top of the
  106. alphabet but really in the
  107. "VARIOUS/N-R/" directory, which
  108. contains approx 23000 tunes. And most
  109. of the "VARIOUS" tunes is not really
  110. what we all remembered from the good '
  111. ol C64 gaming days! Gimme Rob Hubbard!
  112.  
  113. BILL GATES AND HIS "oughta's" After
  114. the renaming of approx 95000 files was
  115. done, I had to convert each .SID file
  116. into CBM 64's .PRG format by
  117. using the excellent PSID64.exe dos
  118. software which makes an C64 executable
  119. out of a .SID file which can be
  120. executed on the real C64 containing
  121. player code + textual information from
  122. the HVSC tags.
  123.  
  124. A couple of files were detected as not
  125. playing, or had problems being
  126. converted during this conversion
  127. process. These files will be recorded
  128. after the main project is finished
  129. using alternative recording methods.
  130. Anyway, the amount of files in this
  131. project went to  a whopping 142134!
  132. (.SID, .INI and now .PRG files)
  133.  
  134. Yeah, working with these amount of
  135. files was beginning to slow down
  136. Windows XP even. They were later
  137. sorted out into 9 different
  138. directories just because DOS and WINME
  139. on the ServerPC and RecordingPC could
  140. not handle this amount of files in one
  141. dir. Stupid Bill Gates and his "oughta
  142. be enough for everybody" shit!!! Now,
  143. I had to start on the hardware part
  144. which was a really painstaking job..
  145.  
  146. CABLES AND COMMUNICATION
  147. Now all the .PRG files was copied
  148. over to the ServerPC HD, and by
  149. running the 64HDD software which
  150. emulates a 1541 Disk Drive for C64 in
  151. DOS, the C64 could now access the
  152. files and load+run+play them. A own
  153. cable was made (XE1541 see pictures)
  154. to support the 64HDD and was connected
  155. to the Serial Port of the C64 and the
  156. PAR: port on the PC. Getting 64HHD up
  157. and running was not the most easiest
  158. part (also due to PAR: bios setups),
  159. and the diodes used in the XE1541
  160. cable was hard to come by. I had to
  161. make 2 of everything, and that added
  162. some delays to the project.After 1
  163. week of constant testing and
  164. configurating it finally worked like a
  165. charm! Also, a Audio/Video 5-pin cable
  166. had to be made and was connected to
  167. the AUDIO/VIDEO connector at the C64.
  168.  
  169. KEYBOARD INTERFACE - MAGIC FINGERS
  170. TYPIN' ON THE C64'S! To be able to
  171. load automatically on the C64 by real
  172. typing chars, an easy and crude
  173. solution had to be constructed. The
  174. result was the homebuilt Parallel
  175. Relay Card connected to the C64
  176. keyboard connector using a IDE 44pin
  177. cable (which fits 100% by the way) The
  178. interface consists of 8 relays which
  179. are each connected to the PAR: port.
  180. By programming again in PureBasic  I
  181. could switch these relays on and off
  182. by command, and thus simulating keys
  183. to be pressed on the real C64, letting
  184. me load all the different filenames
  185. including the keys to LOAD & RUN the
  186. .PRG file as well on the C64. Since I
  187. had limited with PAR: bits to play
  188. with, it was a little bit tricky to
  189. optimize what chars I needed to get
  190. everything run & record automatically
  191. in an long lasting loop for about 13
  192. weeks! The PAR: Relay C64 Keyboard
  193. Interface was designed as follows,
  194. entry after "=" is the actual
  195. C64 key:
  196.  
  197. PAR 01-BIT01 = 2
  198. PAR 01-BIT02 = 3
  199. PAR 01-BIT03 = 4
  200. PAR 01-BIT04 = 5
  201. PAR 01-BIT05 = 6
  202. PAR 01-BIT06 = 7
  203. PAR 01-BIT07 = 8
  204. PAR 01-BIT08 = 9
  205.  
  206. PAR 02-BIT01 = L - for loading
  207. PAR 02-BIT02 = O - for loading
  208. PAR 02-BIT03 = , - for specify the
  209.  C64 DEVICE num
  210. PAR 02-BIT04 = : - : because ":" +
  211.  SHIFT + RUNSTOP = LOAD & RUN in one go
  212.  at theC64
  213.  
  214. PAR 02-BIT05 = SHIFT
  215. PAR 02-BIT06 = RUN STOP
  216. PAR 02-BIT07 = HARD RESET C64 -
  217.  Userport pin 1 & 3...cold reset
  218. PAR 02-BIT08 = SCROLL LOCK - Off when
  219.  not loading tune, ON when loading on
  220.  64HHD Server
  221.  
  222. So, by resetting C64, loading, waiting
  223. and run a SID tune .PRG file, the
  224. PureBasic code was like this:
  225. Procedure C64_Load(); Will write out
  226. L+SHIFT+O+
  227. "
  228. CallFunctionFast(*out,$378,254) ; KEY
  229. LDelay(del)
  230. CallFunctionFast(*out,$378,255) ; OFF
  231. Delay(del)
  232. CallFunctionFast(*out,$378,237) ; KEY
  233. SHIFT + O
  234. Delay(del)
  235. CallFunctionFast(*out,$378,255) ; OFF
  236. Delay(del)
  237. CallFunctionFast(*out,$378,239) ; KEY
  238. SHIFT ON
  239. Delay(del)
  240. CallFunctionFast(*out,$278,254) ; KEY 2
  241. Delay(del)
  242. CallFunctionFast(*out,$278,255) ; OFF
  243. Delay(del)
  244. CallFunctionFast(*out,$378,255) ; OFF
  245. Delay(del)
  246.  
  247. ;Will write out the .prg name
  248.  
  249. ;7 letters to check
  250. For a=1 To 7
  251.  
  252. If Mid(REC$(counter),a,1)="O"
  253. CallFunctionFast(*out,$378,253) ; KEY
  254. O
  255. Delay(del)
  256. CallFunctionFast(*out,$378,255) ; OFF
  257. Delay(del)
  258. EndIf
  259.  
  260. If Mid(REC$(counter),a,1)="L"
  261. CallFunctionFast(*out,$378,254) ; KEY
  262. L
  263. Delay(del)
  264. CallFunctionFast(*out,$378,255) ; OFF
  265. Delay(del)
  266. EndIf
  267.  
  268. If Mid(REC$(counter),a,1)="2"
  269. CallFunctionFast(*out,$278,254) ; KEY
  270. 2
  271. Delay(del)
  272. CallFunctionFast(*out,$278,255) ; OFF
  273. Delay(del)
  274. EndIf
  275.  
  276. If Mid(REC$(counter),a,1)="3"
  277. CallFunctionFast(*out,$278,253) ; KEY
  278. 3
  279. Delay(del)
  280. CallFunctionFast(*out,$278,255) ; OFF
  281. Delay(del)
  282. EndIf
  283.  
  284. If Mid(REC$(counter),a,1)="4"
  285.  
  286. CallFunctionFast(*out,$278,251) ; KEY
  287. 4
  288. Delay(del)
  289. CallFunctionFast(*out,$278,255) ; OFF
  290. Delay(del)
  291. EndIf
  292.  
  293.  
  294. If Mid(REC$(counter),a,1)="5"
  295. CallFunctionFast(*out,$278,247) ; KEY
  296. 5
  297. Delay(del)
  298. CallFunctionFast(*out,$278,255) ; OFF
  299. Delay(del)
  300. EndIf
  301.  
  302.  
  303. If Mid(REC$(counter),a,1)="6"
  304. CallFunctionFast(*out,$278,239) ; KEY
  305. 6
  306. Delay(del)
  307. CallFunctionFast(*out,$278,255) ; OFF
  308. Delay(del)
  309. EndIf
  310.  
  311.  
  312. If Mid(REC$(counter),a,1)="7"
  313. CallFunctionFast(*out,$278,223) ; KEY
  314. 7
  315. Delay(del)
  316. CallFunctionFast(*out,$278,255) ; OFF
  317. Delay(del)
  318. EndIf
  319.  
  320.  
  321. If Mid(REC$(counter),a,1)="8"
  322.  
  323.  
  324. CallFunctionFast(*out,$278,191) ; KEY 8
  325. Delay(del)
  326. CallFunctionFast(*out,$278,255) ; OFF
  327. Delay(del)
  328. EndIf
  329.  
  330.  
  331. If Mid(REC$(counter),a,1)="9"
  332. CallFunctionFast(*out,$278,127) ; KEY 9
  333. Delay(del)
  334. CallFunctionFast(*out,$278,255) ; OFF
  335. Delay(del)
  336. EndIf
  337. Next
  338. a
  339.  
  340.  
  341. ;Will write out the extension part
  342. ",9:+SHIFT+RUNSTOP = Auto Load and RUN!
  343. CallFunctionFast(*out,$278,255) ; OFF
  344. Delay(del)
  345. CallFunctionFast(*out,$378,239) ; KEY
  346. SHIFT ON
  347. Delay(del)
  348. CallFunctionFast(*out,$278,254) ; KEY 2
  349. Delay(del)
  350. CallFunctionFast(*out,$278,255) ; OFF
  351. Delay(del)
  352. CallFunctionFast(*out,$378,251) ; KEY ,
  353. Delay(del)
  354. CallFunctionFast(*out,$378,255) ; OFF
  355. Delay(del)
  356. CallFunctionFast(*out,$278,127) ; KEY
  357. Delay(del)
  358. CallFunctionFast(*out,$278,255) ; OFF
  359. Delay(del)
  360. CallFunctionFast(*out,$378,247) ; KEY :
  361. Delay(del)
  362. CallFunctionFast(*out,$378,255) ; OFF
  363. Delay(del)
  364. CallFunctionFast(*out,$378,207) ; KEY
  365. RUN STOP + SHIFT = LOADING AND RUN!
  366. Delay(del)
  367. CallFunctionFast(*out,$278,255) ; OFF
  368. CallFunctionFast(*out,$378,255) ; OFF
  369.  
  370.  
  371. ; Here we wait for a signal from C64
  372. server thorugh the SCROLL LOCK which
  373. will light when loading is on, and off
  374. when done!
  375.  
  376.  
  377. MeasureHiResIntervalStart() ; Start a
  378. timer to detect endless loop in case
  379. the SCROLLLOCK or 64HDD server crashes!
  380. Repeat
  381. Delay(1)
  382. SetGadgetState(#Load,1)
  383. If MeasureHiResIntervalStop()>120
  384. ;
  385. Seconds. If timer reached this limit,
  386. then 64HDD server is down or the
  387. scrolllock is not working!
  388. MessageRequester("INFO","Timeout: No
  389. response from 64HDD / SCROLL LOCK
  390. Check
  391. connection! - Please restart"
  392. )
  393. CloseLibrary(0)
  394. End
  395. EndIf
  396. Until CallFunctionFast(*inp,$279)=126
  397. Or CallFunctionFast(*inp,$279)=255
  398. ;
  399. ScrollLock (64 server loading)
  400. detection on
  401.  
  402. MeasureHiResIntervalStop()
  403. Delay(1000)
  404.  
  405. MeasureHiResIntervalStart() ; Start a
  406. timer to detect endless loop in case
  407. the SCROLLLOCK or 64HDD server crashes!
  408.  
  409. ;Another loop because 64HDD sends a
  410. double scroll lock ON/OFF signal
  411. quite fast.
  412.  
  413. Repeat
  414. Delay(1)
  415. SetGadgetState(#Load,1)
  416. If MeasureHiResIntervalStop()>120 ;
  417. Seconds. If timer reached this limit,
  418. then 64HDD server is down or the
  419. scrolllock is not working!
  420. MessageRequester("INFO","Timeout: No
  421. response from 64HDD / SCROLL LOCK
  422. Check connection! - Please restart"
  423. )
  424. End
  425. EndIf
  426. Until CallFunctionFast(*inp,$279)=126
  427. Or CallFunctionFast(*inp,$279)=255
  428. ;
  429. ScrollLock (64 server loading)
  430.  detection on
  431.  
  432.  
  433. MeasureHiResIntervalStop(
  434. )
  435. SetGadgetState(#Load,0)
  436. EndProcedure
  437.  
  438.  
  439. Of course there is more code needed,
  440. but thats not important, it was just
  441. to mess up your reading! Hehe
  442.  
  443. THE FIRST SETUP
  444.  
  445. During the first 180 hours of research
  446. of the project, The first setup with
  447. just 1 pcs 8580 CBM 64. This setup was
  448. used for several weeks while designing
  449. the software and constructing the
  450. hardware. It was really placed in a bad
  451. position & was really annoying to have
  452. around... well that's life.
  453.  
  454. HARDWARE SETUP
  455. MADNESS MANIFESTSITSELF
  456. 1 x CBM 64 BreadBox with 6581
  457. SID Chip.
  458. 1 x CBM 64 WhiteyBox with 8580
  459. SID Chip.
  460. 2 x Server PC's (33MHz and 233MHz)
  461. running in DOS mode with 64HDD as
  462. fileserver for the CBM 64 .prg's
  463. 2 x Recording PC's (800Mhz and
  464. 933Mhz) running in WinME with own
  465. programmed record software (SIDREC).
  466. 2 x 1084 Monitors.
  467. 4 x 15 Inch Monitors
  468. 2 x Own constructed PAR Relay to
  469.  CBM 64 keyboard interface.
  470. 2 x Homemade XE1541 Cables.
  471. 2 x Homemade Audio/Video CBM 64 Cables.
  472. 12 x 220V Power plug connections needed
  473.  
  474. As you can see from the pictures, the
  475. hardware setup is a real mess. But if
  476. it works, who cares :)The keyboard and
  477. top chassis of the CBM's are removed.
  478.  
  479. A own tool called SIDREC (for Windows)
  480. was programmed in PureBasic which
  481. controls everything & keep track of the
  482. recording process. The function of the
  483. program is to RESET, LOAD, RECORD,
  484. CONVERT, MAKE MP3 (with tags from HVSC
  485. .INI files) and go in a loop for about
  486. 13+ weeks, 24 hour a day! It also
  487. detects when 64HDD has finished loading
  488. the .PRG file into the C64, at which
  489. point the SIDREC start to record the
  490. tune. A ServerPC & a RecordPC was setup
  491. (with no cabinets for easier access) &
  492. put on a huge table with 6 CRT's and a
  493. s**tload of power connectors & my God
  494. the wires!
  495.  
  496. Pictures here will tell their own
  497. story, you can see all the software
  498. running & the 8580 C64 in action. A fan
  499. system (running at 5v) was also made to
  500. cool down the SID chip, 2 HD's C64
  501. power supply & a old crappy 33MHZ SX
  502. Processor!
  503.  
  504. GETTING THE BOXES
  505. Getting hold of CBM 64's wasnt as easy
  506. you would have thought. I searched some
  507. Norwegian net auction pages, & ended up
  508. with a couple of defect C64 breadboxes.
  509. My own two C64's had  a busted 8580 SID
  510. chip and something wrong with the video
  511. or char chip. Anyway, during 2 months
  512. time in search for cheap C64' I ended
  513. up having 5 pcs 6581 C64's and 4 8580
  514. C64's.. Well, they will make a great
  515. addition to my nostalgic showcase
  516. cabinet along with the Amiga 500/Atari
  517. 2600 from the 80's together with some
  518. old magazines, game box casing & data-
  519. settes, disk drives & joysticks..hehe!
  520.  
  521. FINAL WORDS
  522. Well, here I am - Stone Oakvalley with
  523. the most comprehensive and insane
  524. project to this date. Looking on the
  525. project I must say the work involved
  526. kinda payed off. For who else can
  527. claim the throne of producing the most
  528. complete, real and authentic CBM
  529. 64 SID music database in the world?
  530. From the 19th of November 2006 the
  531. SOASC= project will record
  532. automatically & process about 1000
  533. tunes each 24 hour session for both
  534. the 6581 and 8580 SID models. Expected
  535. date of finalizing should be somewhere
  536. in March 2007!
  537.  
  538. FACTS OF PROJECT:
  539. Based upon HVSC #46 SID database, for
  540.  both 6581+8580
  541. 66000 SID Files
  542. 97508 Files
  543. 178676 Minutes of music
  544. 2978 Hours of music
  545. 124 Days (24h) of music
  546. One persistant human
  547. End result? - Well: 97508 MP3 files
  548.  with a total size of approx 300GB of
  549.  CBM 64 SID music.
  550.  
  551. See you around!
  552. Regards Stone Oakvalley,
  553. Interview by Stein Eikesdal
  554.